<template>
  <el-form inline size="middle">
    <el-row>
      <el-col>
        <el-form-item label="姓名">
          <el-input v-model="formData.name"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col>
        <el-form-item label="年龄">
          <el-input v-model="formData.age"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col>
        <el-form-item label="爱好">
          <el-select v-model="formData.hobby" placeholder="请选择">
            <el-option v-for="item in fdata.hobbyArray"
                       :key="item.value"
                       :label="item.label"
                       :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
export default {
  name: "CreateForm",
  props: ["fdata", "submitUrl"],
  data() {
    return {
      formData: {
        id: "",
        name: "",
        age: "",
        hobby: "",
      }
    }
  },

  methods: {
    submitForm() {
      let res = {...this.formData};
      console.log(res);
    }
  }
}
</script>

<style scoped>

</style>